<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <title>6.12</title>
</head>
<body>
  <button onclick="getsrc()">点击换图</button>
  <img id="imgs" src="https://picx.zhimg.com/v2-6ca9e1a5c977ad26a53fcc11a7ba9f57_720w.jpg?source=172ae18b">
  <script>
    function getsrc() {
      let imgElement = document.getElementById('imgs');

      if (imgElement.src.includes('zhimg.com')) {
        imgElement.src = "https://ts1.tc.mm.bing.net/th/id/R-C.feba36e45a095e4642c3519ba8f2eaf5?rik=phwQfuc%2by56UcQ&riu=http%3a%2f%2fimg95.699pic.com%2fphoto%2f50015%2f1579.jpg_wh860.jpg&ehk=1ujLaPeTcoazoWhHT%2bIaVoYo2WNK4QQNtm2dl%2f1e4LM%3d&risl=&pid=ImgRaw&r=0";
      } else {
        imgElement.src = "https://picx.zhimg.com/v2-6ca9e1a5c977ad26a53fcc11a7ba9f57_720w.jpg?source=172ae18b";
      }
      console.log(imgElement);
    }

    function getname(a, b) {
      console.log("触发 getname，参数：", a, b);
    }
  </script>
</body>
</html>